USE KQSX
GO
SET ANSI_NULLS, QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[proc_Users_Uright_create]
@UName as nvarchar(100),
@AD as int,
@NX as int,
@CN as int,
@CX as int,
@UR as int,
@Ghichu as nvarchar(100),
@GhichuE as nvarchar(100)
WITH ENCRYPTION 
AS
BEGIN
	IF((SELECT COUNT(*) from URight Where UName =@UName)= 0) 
	INSERT INTO URight Select @UName,IName,INameE,IID,@AD,@NX,@CN,@CX,@UR,@Ghichu,@GhichuE,Nhom,1 From UR_list Where Ucha =0
END
GO
